package service.impl;

import dao.DeptDao;
import dao.impl.DeptDaoImpl;
import pojo.Dept;
import service.DeptService;

import java.util.List;

public class DeptServiceImpl implements DeptService {

    DeptDao userDao = new DeptDaoImpl();


    @Override
    public List<Dept> findAll(Dept user) {

        List<Dept> users = userDao.findAll(user);
        return users;

    }

    @Override
    public int addUser(Dept user) {
        return userDao.addUser(user);
    }


    @Override
    public int updateUser(Dept user) {
        return userDao.updateUser(user);
    }

    @Override
    public int deleteUserById(int id) {
        return userDao.deleteUserById(id);
    }
    @Override
    public Dept findUserById(int id) {
        return userDao.findUserById(id);
    }

}
